package com.mediacloud.app.newsmodule.activity.military_encyclopedia

import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.mediacloud.app.assembly.util.loadX
import com.mediacloud.app.newsmodule.R

class MilitaryEncyclopediaVideoRelationAdapter : BaseQuickAdapter<RelativeVideoList,BaseViewHolder>(R.layout.item_bk_video_relation) {
    override fun convert(helper: BaseViewHolder, item:RelativeVideoList) {
        val tvNewsTip = helper.getView<TextView>(R.id.tvNewsTip)
        val tvVideoTitle = helper.getView<TextView>(R.id.tvVideoTitle)
        val ivLogo = helper.getView<ImageView>(R.id.ivLogo)
        tvNewsTip.text = item.duration
        tvVideoTitle.text = item.title
        ivLogo.loadX(item.poster,2,1,false,null)
    }

}